package com.apartment.own.service.impl;

import java.util.List;
import com.apartment.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.apartment.own.mapper.OwnAccountPaymentMapper;
import com.apartment.own.domain.OwnAccountPayment;
import com.apartment.own.service.IOwnAccountPaymentService;

/**
 * 支付详情Service业务层处理
 * 
 * @author @Dog_E
 * @date 2020-08-28
 */
@Service
public class OwnAccountPaymentServiceImpl implements IOwnAccountPaymentService 
{
    @Autowired
    private OwnAccountPaymentMapper ownAccountPaymentMapper;

    /**
     * 查询支付详情
     * 
     * @param id 支付详情ID
     * @return 支付详情
     */
    @Override
    public OwnAccountPayment selectOwnAccountPaymentById(Long id)
    {
        return ownAccountPaymentMapper.selectOwnAccountPaymentById(id);
    }

    /**
     * 查询支付详情列表
     * 
     * @param ownAccountPayment 支付详情
     * @return 支付详情
     */
    @Override
    public List<OwnAccountPayment> selectOwnAccountPaymentList(OwnAccountPayment ownAccountPayment)
    {
        return ownAccountPaymentMapper.selectOwnAccountPaymentList(ownAccountPayment);
    }

    /**
     * 新增支付详情
     * 
     * @param ownAccountPayment 支付详情
     * @return 结果
     */
    @Override
    public int insertOwnAccountPayment(OwnAccountPayment ownAccountPayment)
    {
        ownAccountPayment.setCreateTime(DateUtils.getNowDate());
        return ownAccountPaymentMapper.insertOwnAccountPayment(ownAccountPayment);
    }

    /**
     * 修改支付详情
     * 
     * @param ownAccountPayment 支付详情
     * @return 结果
     */
    @Override
    public int updateOwnAccountPayment(OwnAccountPayment ownAccountPayment)
    {
        ownAccountPayment.setUpdateTime(DateUtils.getNowDate());
        return ownAccountPaymentMapper.updateOwnAccountPayment(ownAccountPayment);
    }

    /**
     * 批量删除支付详情
     * 
     * @param ids 需要删除的支付详情ID
     * @return 结果
     */
    @Override
    public int deleteOwnAccountPaymentByIds(Long[] ids)
    {
        return ownAccountPaymentMapper.deleteOwnAccountPaymentByIds(ids);
    }

    /**
     * 删除支付详情信息
     * 
     * @param id 支付详情ID
     * @return 结果
     */
    @Override
    public int deleteOwnAccountPaymentById(Long id)
    {
        return ownAccountPaymentMapper.deleteOwnAccountPaymentById(id);
    }
}
